package com.example.superyi.myteam.roomPro.entityPro;
import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

import java.io.Serializable;

@Entity(tableName = "AuthorEntity")
public class AuthorEntity implements Serializable {
//    搞一个自增主键把！
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id",typeAffinity = ColumnInfo.INTEGER)
    public int id;

    @ColumnInfo(name = "questionId",typeAffinity = ColumnInfo.TEXT)
    private String questionId; //问题ID

    @ColumnInfo(name = "questionAuthorTid",typeAffinity = ColumnInfo.TEXT)
    private String questionAuthorTid; //头像图片地址

    @ColumnInfo(name = "questionAuthorId", typeAffinity = ColumnInfo.TEXT)
    private String questionAuthorId;

    @ColumnInfo(name = "questionAuthorName",typeAffinity = ColumnInfo.TEXT)
    private String questionAuthorName; //用户名

    @ColumnInfo(name = "releaseTime",typeAffinity = ColumnInfo.TEXT)
    private String releaseTime;//发布时间

    @ColumnInfo(name = "questionTitle", typeAffinity = ColumnInfo.TEXT)
    private String questionTitle; //动态标题

    @ColumnInfo(name = "questionContent", typeAffinity = ColumnInfo.TEXT)
    private String questionContent; //部分动态内容

    public AuthorEntity(String questionId, String questionAuthorTid, String questionAuthorId, String questionAuthorName, String releaseTime, String questionTitle, String questionContent) {
        this.questionId = questionId;
        this.questionAuthorTid = questionAuthorTid;
        this.questionAuthorId = questionAuthorId;
        this.questionAuthorName = questionAuthorName;
        this.releaseTime = releaseTime;
        this.questionTitle = questionTitle;
        this.questionContent = questionContent;
    }

    @Ignore
    public AuthorEntity() {

    }

    @NonNull
    public String getQuestionAuthorTid() {
        return questionAuthorTid;
    }

    public void setQuestionAuthorTid(String questionAuthorTid) {
        this.questionAuthorTid = questionAuthorTid;
    }

    public String getQuestionAuthorName() {
        return questionAuthorName;
    }

    public void setQuestionAuthorName(String questionAuthorName) {
        this.questionAuthorName = questionAuthorName;
    }

    public String getReleaseTime() {
        return releaseTime;
    }

    public void setReleaseTime(String releaseTime) {
        this.releaseTime = releaseTime;
    }

    public String getQuestionTitle() {
        return questionTitle;
    }

    public void setQuestionTitle(String questionTitle) {
        this.questionTitle = questionTitle;
    }

    public String getQuestionContent() {
        return questionContent;
    }

    public void setQuestionContent(String questionContent) {
        this.questionContent = questionContent;
    }

    public String getQuestionId() {
        return questionId;
    }

    public void setQuestionId(String questionId) {
        this.questionId = questionId;
    }

    public String getQuestionAuthorId() {
        return questionAuthorId;
    }

    public void setQuestionAuthorId(String questionAuthorId) {
        this.questionAuthorId = questionAuthorId;
    }
}
